<?php
class MenuWidget extends CWidget
{
    public function run()
    {
        Yii::import('contentMenu.models.ContentMenu');

        $criteria=new CDbCriteria();
        $criteria->condition='isActive=:isActive';
        $criteria->order='sort';
        $criteria->params=array(
            ':isActive'=>1,
        );

        $data=ContentMenu::model()->findAll($criteria);

        if(!empty($data)){
            $this->render('menuWidget',array(
                'data'=>$data,
            ));
        }
    }
}